
@section('title')
	找律师 @parent
@show

@section('content')
<script>
var appUrl = "{{ Config::get('app.url') }}";
var rootUrl = "{{ Config::get('get.url') }}";
var yx_jumpUrl = "{{ Config::get('app.url') }}/question/{{$data['post_id']}}/comment";
var curChatUserId =	"{{$data['user_id']}}";
var content = "{{$data['content']}}";
var created_at = "{{$data['created_at']}}";
var	post_id = "{{$data['post_id']}}";
var realname = "{{$data['realname']}}";
var user_avatar = "{{$data['user_avatar']}}";
var user_realname = "{{ Auth::user()->realname }}";
var currentUserAvatar = "{{ UtilsHelper::getImage(Auth::user()->avatar, 'img/dfimg.png') }}";
var currentUserId = "{{ Auth::user()->id }}";
var easemobUsername = "{{ Auth::user()->id }}";
var easemobPassword = "{{ Auth::user()->password }}";
var easemobAppKey = "{{ Config::get('easemob.appkey') }}";
</script>
{{ HTML::style('lib/css/bootstrap232.css')}}
{{ HTML::script('js/jquery-1.10.2.min.js') }}
{{ HTML::script('js/easemob/sdk/strophe.js') }}
{{ HTML::script('js/easemob/sdk/json2.js') }}
{{ HTML::script('js/easemob/sdk/easemob.im-1.0.7.js') }}
{{ HTML::script('js/easemob/sdk/easemobmain.js') }}
{{ HTML::script('js/easemob/easemob.im.config.js') }}
{{ HTML::script('js/easemob/bootstrap.js') }}
{{ HTML::style('lib/css/webim.css')}}
<!--[if lte IE 9]>
<script src="sdk/jplayer/jquery.jplayer.min.js"></script>
<script src="sdk/swfupload/swfupload.js"></script>
<![endif]-->
<style>
ul{padding: 0;margin: 0;}
.section {display:none}
.site-footer {display:none}
#floatDiv{display:none}
.chatRight {
    width:570px;
    height:610px;
    overflow: hidden;
    position: relative;
    float: left;
    border-radius: 10px;
}
.chat02_bar {
    height: 60px;
    overflow: hidden;
    float: right;
}
.chat02_bar li{
    background-color: #dddee2;
    color: #fff;
    float: right;
    font-size: 20px;
    border-radius: 10px;
    width: 85px;
    line-height: 60px;
    text-align: center;
    cursor: pointer;
    padding: 0;margin: 0;
}
.chat02_bar li:hover{
    background-color: #48b4ff;
}
p2{ font-size: 12px;color:#b5b5b5;position: relative;}

.rightask{
    padding: 15px;
    border-radius: 10px;
    float: right;
    font-size: 20px;
    color: #3d3d3d;
    line-height: 30px;
    background-color: #a0d4fc;
    margin:10px 20px 0 0px;
    max-width: 400;
}
.leftask{
    
    background-color: #ecedf1;
    padding: 15px;
    border-radius: 10px;
    float: right;
    font-size: 20px;
    color: #3d3d3d;
    line-height: 30px;
    margin:10px 0 0 20px;
    max-width: 400;
}
.icon_jiao1 {
    position: absolute;
    width: 27px;
    height: 12px;
    right: -24px;
    top: 14px;
}
.icon_jiao2 {
    position: absolute;
    width: 27px;
    height: 12px;
    left: -14px;
    top: 14px;
}
.name-title{background-color: #48b4ff;font-size: 20px;font-weight: bold;color: #fff;text-align: center;line-height: 60px;
    /*border-top-left-radius: 10px;border-top-right-radius: 10px;*/
}
.chat02_content textarea{margin: 0;}
.chat02_content{padding: 20px;background-color: #f0f1f3;}

.ChatRecordbox {overflow: hidden;}
.ChatRecordbox li{overflow: hidden;margin-bottom: 20px;}
.leftChatRecord{text-align: left;}
.leftChatRecord .ChatRecordimg{margin:30px 20px 0 20px;float: left;border-radius: 50%;overflow: hidden;width: 54px;height: 54px;}
.leftChatRecord .contentinfo{float: left;width:390px;position: relative;}
.leftChatRecord .textContent{background-color: #ecedf1;padding: 15px;border-radius: 10px;float: left;font-size: 20px;color: #3d3d3d;line-height: 30px;}
.leftChatRecord .Recordicon{background: url(/img/myorder/leftRecord.png) center no-repeat;width: 18px; height: 30px;display:inline-block;position: absolute;top: 44px;left: -15px;}
.rightChatRecord .contentinfo p{text-align: right;}
.rightChatRecord .ChatRecordimg{margin:30px 20px 0 20px;;float: right;border-radius: 50%;overflow: hidden;width: 54px;height: 54px;}
.rightChatRecord .contentinfo{float: right;width:390px;position: relative;}
.rightChatRecord .textContent{background-color: #a0d4fc;padding: 15px;border-radius: 10px;float: right;font-size: 20px;color: #3d3d3d;line-height: 30px;}
.rightChatRecord .Recordicon{background: url(/img/myorder/rightRecord.png) center no-repeat;width: 18px; height: 30px;display:inline-block;position: absolute;top: 44px;right: -15px;}


</style>
<div style="">
   <!--  <div id="waitLoginmodal" class="modal hide" data-backdrop="static">
        {{HTML::image('img/loading.gif')}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;正在努力加载中...</img>
    </div> -->

    <div class="content" id="content" style="display: ;">

        <!-- 聊天页面 -->
        <div class="chatRight">
            <div class="name-title">
                @if($data['realname'])
                    {{$data['realname']}}
                @else
                    匿名用户
                @endif
            </div>
            <div id="chat01">
                <div class="chat01_title">
                    <a href="javascript:window.close()"><div id="recycle"></div></a>
                </div>
	                <div id="{{Auth::user()->id}}-{{$data['user_id']}}" calss="chat00_content" classname="chat00_content" style="height:360px;overflow-y: scroll;padding:20px 0;display:
                        block;">
                        <div style="text-align: center"><a href="javascript:void(0)" id="comments-list" style="text-align: center">查看更多</a></div>
                        <ul class="ChatRecordbox">
                            <li id="page" style="display: none"><div class="loading">加载中...</div></li>
                            <!-- <li class="leftChatRecord">
                                <div class="ChatRecordimg"><img src="http://lvtuan-pc-new/img/011_03.png" width="54" height="54"></div>
                                <div class="contentinfo">
                                    <i class="Recordicon"></i>
                                    <p class="font12 colorD">2016-5-55</p>
                                    <div class="textContent">明天去烧烤</div>
                                </div>
                            </li>
                            <li class="rightChatRecord">
                                <div class="ChatRecordimg fr"><img src="http://lvtuan-pc-new/img/011_03.png" width="54" height="54"></div>
                                <div class="contentinfo fr">
                                    <i class="Recordicon"></i>
                                    <p class="font12 colorD">2016-5-55</p>
                                    <div class="textContent">明天去烧烤</div>
                                </div>
                            </li> -->
                        @if($data['comments'])
    	                	@foreach($data['comments'] as $comment)
    	                		@if($comment['creator_id'] == Auth::user()->id)
                                <li class="rightChatRecord">
                                    <div class="ChatRecordimg fr"><img src="{{$comment['creator_avatar']}}" width="54" height="54"></div>
                                    <div class="contentinfo fr">
                                        <i class="Recordicon"></i>
                                        <p class="font12 colorD">{{$comment['created_at']}}</p>
                                        <div class="textContent">{{$comment['content']}}</div>
                                    </div>
                                </li>
                                <!-- <dl class="r-interface">
                                    <dt class="usimg"><img src="{{$comment['creator_avatar']}}"></dt>
                                    <dd style="margin-top:10px"><span class="mane">{{$comment['creator_name']}}</span><label id="created_at" class="dateTime">{{$comment['created_at']}}</label></dd>
                                    <dd id="content" class="issuetxt">
                                        <i class="icon_jiao"><img src="{{ Config::get('app.url') }}/img/question/icon02.png"></i>
                                        <span class="contents">{{$comment['content']}}</span>
                                    </dd>
                                </dl> -->
                            @else
                                <li class="leftChatRecord">
                                    <div class="ChatRecordimg"><img src="{{$comment['creator_avatar']}}" width="54" height="54"></div>
                                    <div class="contentinfo">
                                        <i class="Recordicon"></i>
                                        <p class="font12 colorD">{{$comment['created_at']}}</p>
                                        <div class="textContent">{{$comment['content']}}</div>
                                    </div>
                                </li>
                                <!-- <dl class="l-interface">
                                    <dt class="usimg"><img src="{{$comment['creator_avatar']}}"></dt>
                                    <dd style="margin-top:10px"><span class="mane">{{$comment['creator_name']}}</span><span id="created_at" class="dateTime">{{$comment['created_at']}}</span></dd>
                                    <dd id="content" class="issuetxt">
                                        <i class="icon_jiao"><img src="{{ Config::get('app.url') }}/img/question/icon01.png"></i>
                                        <span class="contents">{{$comment['content']}}</span>
                                    </dd>
                                </dl> -->
                                @endif
    	                	@endforeach
                        @endif
                        </ul>
	                </div>
	            
            </div>

            <div class="chat02">
                <form method="post" id="chatform" action="{{route('question.comment',$data['post_id'])}}">
                <div id="input_content" class="chat02_content">
                	<input type="hidden" id="chatToken" name="_token" value="{{ csrf_token() }}" />
                    <textarea name="comment" id="talkInputId" style="resize: none;"></textarea>
                    <div class="chat02_bar">
                        <ul style="margin:0">
                            <a href="##"><li  class="btn-fasong" style="" onclick="sendText()">发&nbsp;送</li></a>
                        </ul>
                    </div>
                </div>
                <!-- <div class="chat02_bar">
                    <ul>
                        <a href="##"><li  class="btn-fasong" style="" onclick="sendText()">发&nbsp;&nbsp;送</li></a>
                    </ul>
                </div> -->
				</form>
                <div style="clear: both;"></div>
            </div>
        </div>
        <!-- <div class="chatLeft">

            <div class="zx_title">
                <p><span class="inline"></span>咨询标题</p>
                <p class="content_class">{{$data['title']}}</p>
            </div>
            <div class="zx_title">
                <p><span class="inline"></span>咨询内容</p>
                <p class="content_class">{{$data['content']}}</p>
            </div>
        </div> -->
    </div>
</div>
@show
